<?php
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Query;

class DefaultDb_Repositories_UsuariosRepository extends EntityRepository
{
    public function getClientsByName($name)
    {
        $em = $this->getEntityManager();
        $query = $em->createQuery('SELECT c FROM DefaultDb_Entities_Usuarios c WHERE c.nombres LIKE ?1');
        $query->setParameter(1, '%'.$name.'%');
        return $query->getResult();
        //echo $query->getResult();
    }
    
}
